<?php
use Illuminate\Support\Facades\Route;
/*
 * |--------------------------------------------------------------------------
 * | Application Routes
 * |--------------------------------------------------------------------------
 * |
 * | Here is where you can register all of the routes for an application.
 * | It's a breeze. Simply tell Laravel the URIs it should respond to
 * | and give it the Closure to execute when that URI is requested.
 * |
 */
Route::get('/', 'HomeController@showWelcome');

Route::any('/login','HomeController@login');

Route::any('/logout','HomeController@logout');

Route::any('/{view?}',array('before'=>'Auth','uses'=>'HomeController@showWelcome'));//所有视图跳转路由

Route::any('/{view?}/{id?}/{show?}/{url?}',array('before'=>'Auth','uses'=>'CommonController@show'));//所有查看单例视图

// Event::listen('404', function()
// {
//     return Response::error('error');
// //     return View::make('error');
// });